package cn.quickcode.monitor;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
import org.eclipse.wb.swt.ResourceManager;

public final class SMR
{
	public final static ImageDescriptor BUTTON_ACTION_NEW = ResourceManager.getPluginImageDescriptor("SuperMonitor", "icons/icon0.gif");
	public final static ImageDescriptor BUTTON_ACTION_MCP = ResourceManager.getPluginImageDescriptor("SuperMonitor", "icons/icon1.gif");
	public final static ImageDescriptor BUTTON_ACTION_EVM = ResourceManager.getPluginImageDescriptor("SuperMonitor", "icons/icon2.gif");
	public final static ImageDescriptor BUTTON_ACTION_STM = ResourceManager.getPluginImageDescriptor("SuperMonitor", "icons/icon3.gif");
	//public final static ImageDescriptor BUTTON_ACTION_SRM = ResourceManager.getPluginImageDescriptor("SuperMonitor", "icons/icon4.gif");
	public final static ImageDescriptor BUTTON_ACTION_NTM = ResourceManager.getPluginImageDescriptor("SuperMonitor", "icons/icon5.gif");
	public final static ImageDescriptor BUTTON_ACTION_CFG = ResourceManager.getPluginImageDescriptor("SuperMonitor", "icons/icon6.gif");
	public final static ImageDescriptor BUTTON_ACTION_DBM = ResourceManager.getPluginImageDescriptor("SuperMonitor", "icons/icon7.gif");
	public final static ImageDescriptor BUTTON_ACTION_SRM = ResourceManager.getPluginImageDescriptor("SuperMonitor", "icons/icon8.gif");
	public final static ImageDescriptor BUTTON_ACTION_STP = ResourceManager.getPluginImageDescriptor("SuperMonitor", "icons/icon9.gif");
	public final static ImageDescriptor BUTTON_ACTION_STR = ResourceManager.getPluginImageDescriptor("SuperMonitor", "icons/icon10.gif");
	
	public final static Color COLOR_OF = new Color(Display.getCurrent(),new RGB(160,160,160));
	public final static Color COLOR_WC = new Color(Display.getCurrent(),new RGB(30,30,180));
	public final static Color COLOR_OK = new Color(Display.getCurrent(),new RGB(0,119,0));
	public final static Color COLOR_ER = new Color(Display.getCurrent(),new RGB(255,0,0));
	public final static Color COLOR_WR = new Color(Display.getCurrent(),new RGB(255,0,255));
	
	public final static String STATUS_OF = "OF";
	public final static String STATUS_WC = "WC";
	public final static String STATUS_OK = "OK";
	public final static String STATUS_ER = "ER";
	public final static String STATUS_WR = "WR";
	
	public final static Color GET_COLOR(String status)
	{
		if(status.equals(SMR.STATUS_OF))
		{
			return SMR.COLOR_OF;
		}
		else if(status.equals(SMR.STATUS_WC))
		{
			return SMR.COLOR_WC;
		}
		else if(status.equals(SMR.STATUS_OK))
		{
			return SMR.COLOR_OK;
		}
		else if(status.equals(SMR.STATUS_ER))
		{
			return SMR.COLOR_ER;
		}
		else if(status.equals(SMR.STATUS_WR))
		{
			return SMR.COLOR_WR;
		}
		else
		{
			return SMR.COLOR_OF;
		}
	}
}
